Eglot: better fix for bug#70724
authorJoão Távora <joaotavora@gmail.com>
Thu, 6 Jun 2024 22:08:28 +0000 (17:08 -0500)
committerJoão Távora <joaotavora@gmail.com>
Thu, 6 Jun 2024 22:13:57 +0000 (17:13 -0500)
commit6906ed28f1b4ac0cf0a2a725e7402290f33c26e2
tree942f0d5c8359424517e737c08579dea38af0f0d5
parentb571c6571c8bc4c34569650104aee273c19cbfd4
Eglot: better fix for bug#70724

If the project's root is or destroyed , this may happen for a
variety of reasons, including reasons affecting non-reconnection
scenarios, so better to check in eglot--connect.

An Eglot "reconnection" has always created as accurate a copy of
the previous server object as possible, down to the 'eq'ness or
the saved initargs, language ids, etc.  So re-querying for
projects is not the thing to do here.

A new different server can be created with `M-x eglot` which will
ask about shutting down the existing one.

* lisp/progmodes/eglot.el (eglot-reconnect):  Revert previous change.
(eglot--connect):  Do sanity check here
lisp/progmodes/eglot.el